package quik.dbtest;

import java.sql.SQLException;

import com.ibatis.sqlmap.client.SqlMapClient;
import comm.util.SqlMapLoader;

public class DbTest {
	public DbTest(){}
	
	private SqlMapClient sqlMapper = SqlMapLoader.getInstance();
	
	public String testDbConnection(){
		String result = "";
		
		try {
			String resultQuery = sqlMapper.queryForObject("dbtest.testDbConnection").toString();
			if(resultQuery.equals("1"))result="SUCCESS";
		} catch (SQLException e) {
			result = "DB접속 실패 관리자에게 문의하세요.(010-5554-6515)";
		}
		return result;
	}
}
